package com.yuncheng.mcp.config;

import com.yuncheng.mcp.service.MathService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @title: McpStdioServer
 * @Author: Liuxk
 * @Date: 2025/5/22 15:48
 */
@Configuration
public class McpStdioServerConfig {


    @Bean
    public ToolCallbackProvider mathTools(MathService mathService) {
        return MethodToolCallbackProvider.builder().toolObjects(mathService).build();
    }

}
